-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: custom endpoint validation [IDE-126] #454
Conversation
9a37230
to
45451b2
Compare
45451b2
to
25f525e
Compare
package.json
Outdated
"markdownDescription": "Sets API endpoint to use for Snyk requests. Useful for custom Snyk setups. E.g. `https://api.eu.snyk.io`.", | ||
"scope": "window", | ||
"format": "uri", | ||
"pattern": "^(https?://)api.?[a-zA-Z0-9]{0,19}.(snyk|snykgov).io$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing to call out here is that I noticed in IntelliJ the custom endpoint supports http(s)://snyk.io/...
endpoints. VSCode never did though and I'm not sure why
@@ -204,13 +199,6 @@ export class Configuration implements IConfiguration { | |||
return `${hostnameParts[2]}.${hostnameParts[3]}`.includes('snykgov.io'); | |||
} | |||
|
|||
get analyticsPermitted(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code deleted in this file doesn't seem to be used anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added in 8c2811b but the itly analytics have been removed since
@@ -292,10 +280,6 @@ export class Configuration implements IConfiguration { | |||
return Configuration.source; | |||
} | |||
|
|||
get baseApiUrl(): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added in 213c781 but it seems the usage has since been removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to allow empty input too and everything is working fine!
🚀
Description
Improves the validation so that only
http(s)://api.
APIs are configured in the custom endpoint field.Tested manually by running the extension with the latest CLI.
Checklist
Screenshots / GIFs